<?php

namespace App\Http\Controllers\Common;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\App;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Log;

class TestController extends Controller
{


  /**
   * Display a listing of the resource.
   *
   * @return \Illuminate\Http\Response
   */
  public function __construct()
  { }

  public function test(Request $request,Response $response)
  {
    $attachmentRepository = App::make('App\Repositories\Contracts\AttachmentRepositoryInterface');

    $fileInfo = $attachmentRepository->localFileInfo(3);
    if($fileInfo){

      echo $attachmentRepository->imageSize($fileInfo,500);
    }
    // $request->session()->put('name', 'shaoming');
    // $value = $request->session()->get('name', 'default');
    // echo $value;
  }
}
